package com.sc.nft.entity.vo;

import cn.hutool.core.convert.Convert;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.sc.nft.enums.BoxConditionEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class QueryWebBoxConditionVO {
    @ApiModelProperty(value = "持有的藏品名字or需要满足条件的条件内容名字")
    private String name;

    @ApiModelProperty(value = "消耗数量")
    private String costQuantity;

    @ApiModelProperty(value = "兑换条件类型  1.星球碎片 2.权益道具")
    private BoxConditionEnum conversionType;

    @ApiModelProperty(value = "1:持有藏品  2:条件-例子:星球碎片  权益卡")
    @JsonIgnore
    private Integer type;

    @ApiModelProperty(value = "用户拥有的数量")
    private String userOwned;

    @ApiModelProperty(value = "这个id有可能是藏品id,也有可能是满足兑换条件的id.需要根据type类型进行判定")
    @JsonIgnore
    private Long tripartiteId;

    @ApiModelProperty(value = "缩略图")
    private String creationContent;

    public void setCostQuantity(String costQuantity) {
        this.costQuantity = Convert.toStr(Convert.toBigDecimal(costQuantity));
    }

    public void setUserOwned(String userOwned) {
        this.userOwned = Convert.toStr(Convert.toBigDecimal(userOwned));
    }
}
